﻿@model TumbaloSoft.Models.Edificio
@{
    if (ViewBag.permiso == 2)
    {
        Layout = "~/Views/Shared/_AdministradorEdificiosLayout.cshtml";
    }
    else if (ViewBag.permiso == 3)
    {
        Layout = "~/Views/Shared/_AdministradorGeneralLayout.cshtml";
    }
    else if (ViewBag.permiso == 1)
    {
        Layout = "~/Views/Shared/_PropietarioLayout.cshtml";
    }
    else
    {
        Layout = "~/Views/Shared/_AdministracionLayout.cshtml";
    }
    Layout = "~/Views/Shared/_AdministracionLayout.cshtml";
}


<body id="page5">
<!-- content -->
		<div class="body2">
			<div class="main">
				<section id="content">
					<div class="wrapper">
                        <!--ESTA COLUMNA ES PARA EL MENU DE NAVEGACION DE LA IZQUIERDA QUE HABIA EN LOS MOCKUPS
                            DISCULPEN SI LOS ESTILOS ESTAN MAL NO SE MUCHO CSS-->
                        <article class="col0">
                            <nav class="urbangreymenu">
                                <h3 class="headerbar">Mantenimiento Edificio</h3>
                                    <ul id="subMenu">
                                        <li><h5>@Html.ActionLink("Nuevo Edificio","Registrar")</h5></li>
                                        <li><h5>@Html.ActionLink("Buscar Edificio","Index")</h5></li>
                                    </ul>
                            </nav>
                        </article>
						<article class="col1">
                            <!--dentro de div pad2 trabajare mi formulario -->
							<div class="pad2">
								<h2 class="pad_bot1 pad_top1">Eliminar edificio</h2>
									
                                   <form id="ContactForm" method="post">
									
										<div  class="wrapper">
											<span><br>Código</span>
											<br>@Html.TextBoxFor(model => model.prIdEdificio, new { @readonly = "readonly" }) 
                                                @Html.ValidationMessageFor(model => model.prIdEdificio,null ,new{style = "float: none"}) 
										</div>

										<div  class="wrapper">
                                            <span><br>Nombre</span>
											<br>@Html.TextBoxFor(model => model.prNombre, new { @readonly = "readonly" }) 
                                                @Html.ValidationMessageFor(model => model.prNombre,null ,new{style = "float: none"})
										</div>

										<div  class="wrapper">
											<span><br>Dirección</span>
											<br>@Html.TextBoxFor(model => model.prDireccion,new { @readonly = "readonly" }) 
                                                @Html.ValidationMessageFor(model => model.prDireccion,null ,new{style = "float: none"})
										</div>

                                       <div class="wrapper">
                                           <span><br>Distrito</span>
                                           <br><select name="prIdDistrito" >
                                               @foreach (var objDistrito in ViewBag.lista)
                                               {
                                                   if(Model != null && Model.prDistrito.prIdDistrito == objDistrito.prIdDistrito){
                                                   <option value="@objDistrito.prIdDistrito" selected="selected">@objDistrito.prNombreDistrito</option>
                                                   }
                                               }
                                               </select>
                                       </div>
                                        
                                        <div  class="wrapper">
											<span><br>Numero de Pisos</span>
											<br>@Html.TextBoxFor(model => model.prNroPisos, new { @readonly = "readonly" }) 
                                                @Html.ValidationMessageFor(model => model.prNroPisos,null ,new{style = "float: none"})
										</div>
                                        
                                        <div  class="wrapper">
											<span><br>Numero de Departamentos</span>
											<br>@Html.TextBoxFor(model => model.prNroDepartamentos,new { @readonly = "readonly" }) 
                                                @Html.ValidationMessageFor(model => model.prNroDepartamentos,null ,new{style = "float: none"})
										</div>                                       

                                       <div  class="wrapper">
											<span><br>Area(m2)</span>
											<br>@Html.TextBoxFor(model => model.prArea, new { @readonly = "readonly" }) 
                                                @Html.ValidationMessageFor(model => model.prArea,null ,new{style = "float: none"})
										</div> 
                                       <div  class="wrapper">
											<span><br>Costo de Mantenimiento*</span>
											<br>@Html.TextBoxFor(model => model.prMonto) 
                                                @Html.ValidationMessageFor(model => model.prMonto,null ,new{style = "float: none"})
									    </div> 
                                       <div  class="wrapper">
											<span><br>Informacion</span>
											<br>@Html.TextAreaFor(model => model.prInformacion,new {style="max-width:25em;max-height:15ex;", @readonly="readonly"}) 
                                                @Html.ValidationMessageFor(model => model.prInformacion,null ,new{style = "float: none"})
										</div> 
                                       <div class="wrapper">
                                                <span><br>Tiene Contómetro</span>
                                                @if (Model != null && Model.prTieneContometro == "1"){
                                                
                                                    <br/><input type="checkbox" name="prTieneContometro" value="1" checked disabled/>
                                               }
                                                else{
                                                    <br/><input type="checkbox" name="prTieneContometro" value="1" disabled/>
                                                }
                                        </div>                                     
                                       <div  class="wrapper">
											<span><br>Departamentos</span>
											<br><table border ="1">
                                                <tr>
                                                    <th>ID</th>
                                                    <th>Numero</th>
                                                    <th>Estado</th>
                                                </tr>
                                                @if (Model != null){
                                                    foreach (var dpto in Model.prListaDepartamentos)
                                                    {
                                                        <tr>
                                                            <td>@dpto.prIdDepartamento</td>
                                                            <td>@dpto.prNumeroDepartamento</td>
                                                            <td>@dpto.prEstado</td>
                                                        </tr>
                                                    }
                                                }
											</table>
                                            </div>
                                       <div  class="wrapper">
											<span><br>Areas Comunes</span>
											<br><table border ="1">
                                                <tr>
                                                    <th>ID</th>
                                                    <th>Area Total</th>
                                                    <th>Estado</th>
                                                </tr>
                                                @if (Model != null){
                                                    foreach (var areaComun in Model.prListaAreasComunes)
                                                    {
                                                        <tr>
                                                            <td>@areaComun.prIdAreaComun</td>
                                                            <td>@areaComun.prArea</td>
                                                            <td>@areaComun.prEstado</td>
                                                        </tr>
                                                    }
                                                }
											</table>
                                        </div> 
										<span>&nbsp;</span>
                                       	<a href="#" class="button" onClick="document.getElementById('ContactForm').submit()">Eliminar</a>
										<a href="javascript:history.go(-1)" class="button" onClick="document.getElementById('ContactForm').cancel()">Cancelar</a>
								
								</form>
                                </div>
								 
							
						</article>
                        </div>
				
				</section>
			</div>
            </div>
		
<!-- / content -->
		
		<script type="text/javascript"> Cufon.now(); </script>

</body>
